#!/usr/bin/env python3
"""ASD Latin America Analysis Script
Author: Juan Moises de la Serna
"""
import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('asd_extended.csv')
print(df.groupby('year')['asd_cases_estimated'].sum())

df_pivot = df.pivot(index='country', columns='year', values='asd_cases_estimated')
df_pivot.plot(kind='bar')
plt.title('Estimated ASD Cases by Country')
plt.ylabel('Estimated Cases')
plt.tight_layout()
plt.savefig('asd_cases.png', dpi=150)
